package com.douxg.learning.bigdata.solr;

import org.I0Itec.zkclient.ZkClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName ZkClientConfig
 * @Description TODO
 * @Author douxg
 * @Date 2020/2/18 10:55
 * @Version 1.0
 */
@Configuration
public class ZkClientConfig {
    @Value("${spring.data.solr.zk-host}")
    private String zkurl;

    @Bean
    public ZkClient createZkClient() {
        return new ZkClient(zkurl, 3000);
    }
}
